CommandScript Reference

home

     

Commands

<Echo> message Write's messages to the LogWindow (and logfile) of FST  
<CopyFile> sourcefile destinationfile Copy a file (uses WIN32API)  
<MoveFile> sourcefile destinationfile Move a file (uses WIN32API)  
<DeleteFile> sourcefile Delete a file  
<DeleteEmptyFile> sourcefile Deletes specified file only when filesize is 0 bytes  
<PurgeFile> n file Deletes "file" when "file" is older then "n" days  
<CreateDir> directory Create a directory(tree)  
<RemoveDir> directory Remove an empty directory(tree)  
<Shell> shell-command Execute a shell command  
<DDE> Setup a DDE link  
<SetVariable> <Local> <n> Dynamically setup local-variables using the following functions. "n" is number of variable  
  <SubString> start length string get "length" characters from "string" starting at "start"  
  <StringLength> string get length of "string"  
  <FindString> start search-char search-string Search for "search-char" in "search-string" starting at "start"  
  <UpperCase> string convert "string" to upper-case  
  <LowerCase> string convert "string" to lower-case  
  <ReplaceChar> findchar replacechar string replace all "findchar" in "string" with "replacechar"
"findchar" and "replacechar" can be one or more characters
 
  <ReplaceSpace> replacechar string replace all spaces in "string" with "replacechar"  
  <StripChar> char string remove all "char" from "string"
"char" can be one or more characters
 
  <Add> value1 value2 add "value2" to "value1"  
  <Subtract> value1 value2 subtract "value2" from "value1"  
  <Multiply> value1 value2 multiply "value1" with "value2"  
  <Divide> value1 value2 divide "value1" by "value2"  
  <Int> value get integer of "value"  
<SetVariable> <Global> <n> Same as "<SetVariable> <Local> <n>" but for "Global Variables"  
     

Attributes

<SetNormalAttribute> sourcefile Set the attribute of the file to "normal"  
<SetReadOnlyAttribute> sourcefile Set the attribute of the file to "read-only"  
<SetHiddenAttribute> sourcefile Set the attribute of the file to "hidden"  
<SetSystemAttribute> sourcefile Set the attribute of the file to "system"  
<SetArchiveAttribute> sourcefile Set the attribute of the file to "archive"  
     

File

<ScanPathFileName> Complete inputpath of the found file, including directory and filename  
<FileName> Filename of the found file  
<FileNameExt> Extension of the found file  
<FileNameNoExt> Filename without the extension of the found file  
     

Directory

<ScanDir>

Scan-directory you configured in the FileScanner setup

 
<ScanPath> Complete path where file was found, including subdirectories  
<SubDir> Only the path "below" "ScanDir" where file was found  
     

FileInfo

<FileSize> Size in bytes of found file  
<FileTimeStamp> Timestamp of found file  
     

Locals

<Constants> <LC1>, <LC10> Local Constants 1-10  
<Variables> <LV1>, <LV10> Local Variables 1-10  
     

Globals

<Constants> <GC1>, <GC10> Global Constants 1-10  
<Variables> <GV1>, <GV10> Global Variables 1-10  
     

Date

<dd-mmm-yyyy> Returns current date in "dd-mmm-yyyy" format  
<dd> Returns current day of the month  
<mmm> Returns current month of the year  
<yyyy> Returns current year  
<yy> Returns last two digits of current year  
     

Time

<hh:mm:ss> Returns current time in "hh:mm:ss" format  
<hh> Returns current hour  
<mm> Returns current minute  
<ss> Returns current second  
     

home